<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- <link
    rel="stylesheet"
    href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.0.0/animate.min.css"
  /> -->
    <style>
        @keyframes rr {
            0% {
                transform: translate(0, 0) ;

            }

            25% {
                transform: translate(500px, 0) rotate(180deg);
                    background-color: blue;
            }

            50% {
                transform: translate(500px, 400px) rotate(225deg);
                border-radius: 30px; 
                background-color: red;

            }
            75% {
                transform: translate(0px, 400px) rotate(225deg);
            border-radius: 30px;
            background-color: green;
            }
            
            100% {
                transform: translate(0, 0);
                border-radius: 30px;
                background-color: yellow;
            }
        }
        .box1{
            height: 60px;
            width: 70px;
            background-color: pink;
            animation: rr 7s 2 alternate;
            animation: name duration timing-function delay iteration-count direction fill-mode;
        }
    </style>
</head>

<body>
    <!-- <h1 class="animate__animated animate__fadeOutDown">An animated element</h1> -->
    <div class="box1"></div>
</body>

</html>